import QtQuick 2.15
import QtQuick.Window 2.15
import App.Global 1.0

Window {
    visible: true
    title: qsTr("Hello World")
    flags:Qt.FramelessWindowHint | Qt.Window | Qt.WindowSystemMenuHint |
        Qt.WindowMaximizeButtonHint | Qt.WindowMinimizeButtonHint   //设置无边框属性
    //重写鼠标拖动事件
    MouseArea{
        anchors.fill:parent
        property point clickPos:"0,0"
        onPressed: function (mouse) {
            clickPos=Qt.point(mouse.x,mouse.y)
        }
        onPositionChanged: function (mouse) {
            let delta=Qt.point(mouse.x-clickPos.x,mouse.y-clickPos.y)
            myWindow.x+=delta.x
            myWindow.y+=delta.y
        }
        onClicked: {
            GlobalState.blankAreaClicked()
        }
    }
}
